package org.springcloud.catalina.eurekaclient.controller;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class HelloController {

    @Value("${server.port}")
    String port;

    @RequestMapping(value = "/hello/{name}", method = RequestMethod.POST)
    public String home(@PathVariable("name") String name) {
        return "hello " + name + ",i am from port: " + port;
    }
}
